import java.util.Random;
import java.util.Scanner;

public class ScannerDemo06 {
    public static void main(String[] args) {
        String name = "隔壁老王";
        System.out.println(name);

        // 创建一个扫描器对象
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入性别：");
        // 把键盘中获取的值赋值给gender变量
        String gender = scanner.next();
        System.out.println(gender);

        System.out.println("请输入年龄：");
        int age = scanner.nextInt();
        System.out.println(age);
    }
}